package cn.com.chengmandian.bike.constants;

public enum FaultBillInfoStatus {
    // 处理状态:0.待处理 1.处理中 2.处理完毕 3.已撤销
    WAIT(0, "待处理"),
    HANDLE(1, " 处理中"),
    COMPLETE(2, "处理完毕"),
    CANCEL(3, "已撤销");

    private Integer code;
    public Integer getCode(){
        return this.code;
    }

    private String name;
    public String getName(){
        return this.name;
    }

    public static FaultBillInfoStatus getByCode(Integer code){
        if(code == null){
            return null;
        }else{
            FaultBillInfoStatus[] infoStatuses = values();
            for(FaultBillInfoStatus infoStatus :infoStatuses){
                if(infoStatus.getCode().equals(code)){
                    return infoStatus;
                }
            }
        }
        return null;
    }

    FaultBillInfoStatus(Integer code, String name){
        this.code = code;
        this.name = name;
    }
}
